home *** CD-ROM | disk | FTP | other *** search
/ PC Direct 1998 August / PC Direct August 1998.iso / S / powerj / Product / hpp.z / dtjoleob.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1997-11-25  |  3.4 KB  |  109 lines

  1. #ifndef _DTJOLEOB_HPP
  2. #define _DTJOLEOB_HPP
  3.  
  4. #include "dtjobjct.hpp"
  5.  
  6. class MetaObject;
  7. struct BindableOlePropInfo;
  8.  
  9. class METAEXPORTCLASSDEF DTJOleObject : public DTJObject {
  10.     public:
  11.     DTJOleObject( const MetaObject * meta );
  12.     ~DTJOleObject();
  13.  
  14.     virtual    WJavaObject*    GetWJavaObject() const;
  15.  
  16.     virtual WString        GetObjectPrefix() const;
  17.  
  18.     virtual WString        DTGetName() const;
  19.  
  20.     virtual WBool        Create( WWindow * parent, const WRect & r,
  21.                         const WChar * text, WStyle style,
  22.                     WStyle exStyle, void * data = NULL,
  23.                     WBool isLoading = FALSE );
  24.  
  25.     virtual void        DTGetRectangle( WRect & r, WBool abs = FALSE ) const;
  26.     virtual void        DTGetClientRectangle( WRect & r ) const;
  27.     virtual void        DTSetRectangle( const WRect & r, WBool abs = FALSE );
  28.     virtual void        DTBringToTop();
  29.     virtual void        DTRepaint( WRect * rect=NULL );
  30.     virtual WWindow *    DTGetParent() const;
  31.     virtual WBool         DTSetEventHandler( WEventID id,
  32.                          WObject * object,
  33.                          WEventHandler handler,
  34.                          void *userdata=NULL );
  35.  
  36.     virtual WStyle        GetStyle() const;
  37.     virtual WBool        SetStyle( WStyle stl, WBool clone=FALSE );
  38.     virtual WStyle        GetDefaultStyle() const;
  39.  
  40.     virtual WStyle        GetExtendedStyle() const;
  41.     virtual WBool        SetExtendedStyle( WStyle style, WBool clone=FALSE );
  42.     virtual WStyle        GetDefaultExtendedStyle() const;
  43.  
  44.     virtual void        GenClassName( WString & ) const;
  45.  
  46.     // Save and Load DTInfo
  47.     virtual WBool        HasDTInfo();
  48.     virtual WBool        SaveDTInfo( SaveSource & );
  49.     virtual WBool        LoadDTInfo( SaveBlock *, WBool );
  50.  
  51.     virtual WBool        GetIsResizeable();
  52.     virtual WBool        CreateEventPopupMenu( WPopupMenu * popup );
  53.  
  54.     virtual WBool        GetOLEPropertyList( WInt *num, BindableOlePropInfo **propList );
  55.  
  56.     // Overrides
  57.     virtual void         DTSetName( const WString & name );
  58.  
  59.     virtual void GenerateImports( ostream& src,
  60.                         MMJCodeGenerationParms* pGenParms ) const;
  61.  
  62.     virtual WBool CanCreateNonImplementationJavaObj() const;
  63.  
  64.     public:
  65.     virtual void        AmendPopup( WPopupMenu *popup, WBool before );
  66.     virtual void        SetForm( DTFormEditBase * );
  67.  
  68.         virtual void GenerateCode( MMCodeGeneration mmCodeGen,
  69.                    ostream& src,
  70.                    MMCodeGenerationParms& pGenParms );
  71.  
  72.     protected:
  73.  
  74.     virtual void GenerateAddListenerCode( const WString prefix,
  75.                                               ostream& src,
  76.                           MMJCodeGenerationParms* pGenParms ) const;
  77.  
  78.     WOleObject *        GetWOleObject() const;
  79.     WBool            HdlOleMenuTrampoline( WObject * src, WEventData * data );
  80.  
  81.     private:
  82.     WBool            _loadFromFile;
  83.     WString            _oleID;
  84.     WInt            _lastOleMenuItem;
  85.     BindableOlePropInfo *    _propList;
  86.     WInt            _numProps;
  87.     WStringArray        _dtProps;
  88.     WStringArray        _dtPropValues;
  89. };
  90.  
  91. class METAEXPORTCLASSDEF DTJOleProgrammableObject :  public DTJObject {
  92.     public:
  93.         DTJOleProgrammableObject( const MetaObject * meta );
  94.         ~DTJOleProgrammableObject();
  95.  
  96.     protected:
  97.         virtual void GenerateCode( MMCodeGeneration mmCodeGen,
  98.                    ostream& src,
  99.                    MMCodeGenerationParms& pGenParms );
  100. };
  101.  
  102. // needed for mdreader
  103. typedef DTJOleObject DTpowersoft__dot__powerj__dot__ui__dot__JOleObject__dot__102;
  104. typedef WOleObject powersoft__dot__powerj__dot__ui__dot__JOleObject__dot__102;
  105. typedef DTJOleObject DTpowersoft__dot__powerj__dot__ui__dot__JVisualOleObject__dot__102;
  106. typedef WOleObject powersoft__dot__powerj__dot__ui__dot__JVisualOleObject__dot__102;
  107.  
  108. #endif // _DTJOLEOB_HPP
  109.